{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\FEVS_2011.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}17 Jun 2021, 23:04:21

{com}. import delimited "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\FEVS\FEVS_2010-2019\FEVS2011_PRDF.csv"
{res}{text}(98 vars, 266,376 obs)

{com}. svyset [pweight=postwt]

      {txt}pweight:{col 16}{res}postwt
          {txt}VCE:{col 16}{res}linearized
  {txt}Single unit:{col 16}{res}missing
     {txt}Strata 1:{col 16}<one>
         SU 1:{col 16}<observations>
        FPC 1:{col 16}<zero>
{p2colreset}{...}

{com}. 
. 
. 
. 
. 
. drop if q17=="X"
{txt}(11,875 observations deleted)

{com}. 
. drop if q17==""
{txt}(1,046 observations deleted)

{com}. 
. drop if q37=="X"
{txt}(10,292 observations deleted)

{com}. 
. drop if q37==""
{txt}(5,559 observations deleted)

{com}. 
. drop if q38=="X"
{txt}(8,929 observations deleted)

{com}. 
. drop if q38==""
{txt}(1,272 observations deleted)

{com}. 
. drop if q15=="X"
{txt}(2,348 observations deleted)

{com}. 
. drop if q15==""
{txt}(533 observations deleted)

{com}. 
. drop if q22=="X"
{txt}(7,083 observations deleted)

{com}. 
. drop if q22==""
{txt}(624 observations deleted)

{com}. 
. drop if q25=="X"
{txt}(4,028 observations deleted)

{com}. 
. drop if q25==""
{txt}(580 observations deleted)

{com}. 
. drop if q33=="X"
{txt}(3,581 observations deleted)

{com}. 
. drop if q33==""
{txt}(622 observations deleted)

{com}. 
. drop if q48==.
{txt}(2,247 observations deleted)

{com}. 
. drop if q49==.
{txt}(678 observations deleted)

{com}. 
. 
. 
. destring q17, replace
{txt}q17: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q37, replace
{txt}q37: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q38, replace
{txt}q38: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q15, replace
{txt}q15: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q22, replace
{txt}q22: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q25, replace
{txt}q25: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q33, replace
{txt}q33: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. 
. 
. svy linearized : sem (JUSTICE -> DISTRIBUTIVE, ) (JUSTICE -> PROCEDURAL, ) (JUSTICE -> INTERPERSONAL, ) (DISTRIBUTIVE -> q22, ) (DISTRIBUTIVE -> q25, ) (DISTRIBUTIVE -> q33, ) (PROCEDURAL -> q15, ) (PROCEDURAL -> q17, ) (PROCEDURAL -> q37, ) (PROCEDURAL -> q38, )(INTERPERSONAL -> q48, ) (INTERPERSONAL -> q49, ), standardized latent(JUSTICE DISTRIBUTIVE PROCEDURAL INTERPERSONAL ) nocapslatent
{txt}(running sem on estimation sample)
{res}
{txt}{col 1}Survey: Structural equation model{col 49}Number of obs{col 67}= {res}   205,079
{txt}{col 1}Number of strata{col 22}= {res}        1{txt}{col 49}Population size{col 67}={res}  1,404,511
{txt}{col 1}Number of PSUs{col 22}= {res}  205,079{txt}{col 49}Design df{col 67}= {res}   205,078

{p 0 7}{space 1}{text:( 1)}{space 1} [q22]DISTRIBUTIVE = 1{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} [q15]PROCEDURAL = 1{p_end}
{p 0 7}{space 1}{text:( 3)}{space 1} [q48]INTERPERSONAL = 1{p_end}
{p 0 7}{space 1}{text:( 4)}{space 1} [DISTRIBUTIVE]JUSTICE = 1{p_end}
{txt}{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33}  Linearized
{col 1}       Standardized{col 21}{c |}      Coef.{col 33}   Std. Err.{col 45}      t{col 53}   P>|t|{col 61}     [95% Con{col 74}f. Interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Structural         {col 21}{txt}{c |}
{space 2}{col 3}DISTRIBUTIVE     {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .8515913{col 33}{space 2} .0031606{col 44}{space 1}  269.44{col 53}{space 3}0.000{col 61}{space 4} .8453967{col 74}{space 3} .8577859
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}PROCEDURAL       {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .9855318{col 33}{space 2} .0031103{col 44}{space 1}  316.86{col 53}{space 3}0.000{col 61}{space 4} .9794357{col 74}{space 3} .9916279
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}INTERPERSONAL    {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .7011966{col 33}{space 2} .0034457{col 44}{space 1}  203.50{col 53}{space 3}0.000{col 61}{space 4} .6944431{col 74}{space 3} .7079501
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Measurement        {col 21}{txt}{c |}
{space 2}{col 3}q22              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8394009{col 33}{space 2} .0020895{col 44}{space 1}  401.72{col 53}{space 3}0.000{col 61}{space 4} .8353054{col 74}{space 3} .8434963
{txt}{space 14}_cons {c |}{col 21}{res}{space 2}  2.49145{col 33}{space 2} .0081719{col 44}{space 1}  304.88{col 53}{space 3}0.000{col 61}{space 4} 2.475433{col 74}{space 3} 2.507467
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q25              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8220927{col 33}{space 2} .0024177{col 44}{space 1}  340.03{col 53}{space 3}0.000{col 61}{space 4} .8173541{col 74}{space 3} .8268314
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.599091{col 33}{space 2} .0089502{col 44}{space 1}  290.40{col 53}{space 3}0.000{col 61}{space 4} 2.581549{col 74}{space 3} 2.616633
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q33              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .7051444{col 33}{space 2} .0028606{col 44}{space 1}  246.51{col 53}{space 3}0.000{col 61}{space 4} .6995377{col 74}{space 3}  .710751
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.333579{col 33}{space 2} .0067799{col 44}{space 1}  344.19{col 53}{space 3}0.000{col 61}{space 4} 2.320291{col 74}{space 3} 2.346868
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q15              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .6145053{col 33}{space 2} .0041897{col 44}{space 1}  146.67{col 53}{space 3}0.000{col 61}{space 4} .6062935{col 74}{space 3} .6227171
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.341645{col 33}{space 2}  .014515{col 44}{space 1}  230.22{col 53}{space 3}0.000{col 61}{space 4} 3.313196{col 74}{space 3} 3.370094
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q17              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .7301409{col 33}{space 2} .0031713{col 44}{space 1}  230.24{col 53}{space 3}0.000{col 61}{space 4} .7239253{col 74}{space 3} .7363566
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.052138{col 33}{space 2} .0121269{col 44}{space 1}  251.68{col 53}{space 3}0.000{col 61}{space 4} 3.028369{col 74}{space 3} 3.075906
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q37              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .8172515{col 33}{space 2} .0026372{col 44}{space 1}  309.89{col 53}{space 3}0.000{col 61}{space 4} .8120826{col 74}{space 3} .8224203
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.806905{col 33}{space 2} .0102876{col 44}{space 1}  272.84{col 53}{space 3}0.000{col 61}{space 4} 2.786742{col 74}{space 3} 2.827069
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q38              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .7939714{col 33}{space 2} .0027504{col 44}{space 1}  288.68{col 53}{space 3}0.000{col 61}{space 4} .7885807{col 74}{space 3}  .799362
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.413154{col 33}{space 2} .0151372{col 44}{space 1}  225.48{col 53}{space 3}0.000{col 61}{space 4} 3.383485{col 74}{space 3} 3.442822
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q48              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9286823{col 33}{space 2} .0024385{col 44}{space 1}  380.84{col 53}{space 3}0.000{col 61}{space 4} .9239029{col 74}{space 3} .9334616
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.856979{col 33}{space 2} .0172205{col 44}{space 1}  223.98{col 53}{space 3}0.000{col 61}{space 4} 3.823227{col 74}{space 3}  3.89073
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q49              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9079197{col 33}{space 2} .0022109{col 44}{space 1}  410.66{col 53}{space 3}0.000{col 61}{space 4} .9035864{col 74}{space 3} .9122529
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 4.163026{col 33}{space 2} .0208006{col 44}{space 1}  200.14{col 53}{space 3}0.000{col 61}{space 4} 4.122257{col 74}{space 3} 4.203795
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 10}var(e.q22){c |}{col 21}{res}{space 2} .2954062{col 33}{space 2} .0035079{col 61}{space 4} .2886101{col 74}{space 3} .3023623
{txt}{space 10}var(e.q25){c |}{col 21}{res}{space 2} .3241635{col 33}{space 2} .0039752{col 61}{space 4} .3164652{col 74}{space 3} .3320491
{txt}{space 10}var(e.q33){c |}{col 21}{res}{space 2} .5027714{col 33}{space 2} .0040342{col 61}{space 4} .4949263{col 74}{space 3} .5107409
{txt}{space 10}var(e.q15){c |}{col 21}{res}{space 2} .6223832{col 33}{space 2} .0051492{col 61}{space 4} .6123723{col 74}{space 3} .6325579
{txt}{space 10}var(e.q17){c |}{col 21}{res}{space 2} .4668942{col 33}{space 2}  .004631{col 61}{space 4} .4579053{col 74}{space 3} .4760596
{txt}{space 10}var(e.q37){c |}{col 21}{res}{space 2} .3321001{col 33}{space 2} .0043105{col 61}{space 4} .3237581{col 74}{space 3} .3406569
{txt}{space 10}var(e.q38){c |}{col 21}{res}{space 2} .3696095{col 33}{space 2} .0043674{col 61}{space 4} .3611478{col 74}{space 3} .3782694
{txt}{space 10}var(e.q48){c |}{col 21}{res}{space 2} .1375492{col 33}{space 2} .0045292{col 61}{space 4} .1289526{col 74}{space 3}  .146719
{txt}{space 10}var(e.q49){c |}{col 21}{res}{space 2} .1756819{col 33}{space 2} .0040146{col 61}{space 4}  .167987{col 74}{space 3} .1837292
{txt}{space 1}var(e.DISTRIBUTIVE){c |}{col 21}{res}{space 2} .2747923{col 33}{space 2}  .005383{col 61}{space 4} .2644417{col 74}{space 3}  .285548
{txt}{space 3}var(e.PROCEDURAL){c |}{col 21}{res}{space 2} .0287271{col 33}{space 2} .0061306{col 61}{space 4} .0189077{col 74}{space 3} .0436461
{txt}var(e.INTERPERSONAL){c |}{col 21}{res}{space 2} .5083234{col 33}{space 2} .0048322{col 61}{space 4}   .49894{col 74}{space 3} .5178832
{txt}{space 8}var(JUSTICE){c |}{col 21}{res}{space 2}        1{col 33}{space 2}        .{col 61}{space 4}        .{col 74}{space 3}        .
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. 
. 
. 
. estat gof, stats(all)
{res}
{txt}{hline 21}{c TT}{hline 54}
{lalign 21:Fit statistic}{c |}      Value   Description
{hline 21}{c +}{hline 54}
{lalign 21:Size of residuals}{c |}
{ralign 20:SRMR} {c |} {res}{ralign 10:     0.039}{txt}   Standardized root mean squared residual
{ralign 20:CD} {c |} {res}{ralign 10:     0.974}{txt}   Coefficient of determination
{hline 21}{c BT}{hline 54}
{p 0 2 2 75}Note: model was fit with{txt} svy: prefix; only stats(residuals) valid.{p_end}

{com}. predict justice, latent(JUSTICE)
{res}
{com}. 
. 
. 
. egen average_justice = mean (justice), by (agency)

. 
. 
. 
. egen sub_average_justice = mean (justice), by (subelem)

. save "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2011FEVS_Justice.dta"
{txt}file C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2011FEVS_Justice.dta saved

{com}. exit, clear
